package com.linkq.ipinyin.controller;

import com.linkq.ipinyin.model.Reply;
import com.linkq.ipinyin.service.ReplyService;
import com.linkq.ipinyin.vo.ResultInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * @FileName ReplyController
 * @Description
 * @Author wangpeng
 * @date 2025-03-01
 **/

@RestController
@RequestMapping("reply")
public class ReplyController {
    @Autowired
    private ReplyService replyService;

    @PostMapping("submit")
    public ResultInfo submit(Reply reply, @RequestParam(value = "files", required = false) List<MultipartFile> files) {
        return replyService.submitRely(reply, files);
    }

    @PostMapping("getReplyByFeedbackId")
    public ResultInfo getReplyByFeedbackId(Integer feedbackId) {
        return replyService.getReplyByFeedbackId(feedbackId);
    }


}
